package tests;

import common.Utils;
import org.openqa.selenium.By;

//详情页
public class DetailPage extends Utils {
    public static String url=detailUrl;


    public DetailPage()
    {
        super(url);
    }

    /**
     1.校验详情页是否正常加载
     */
    public void CheckPageRight()
    {
        //标题
        String title=driver.findElement(By.cssSelector("##")).getText();
        //发布时间
        String pushTime=driver.findElement(By.cssSelector("##")).getText();
          //内容---用父标签，内容删除，子标签会动态变化
        String content=driver.findElement(By.cssSelector("##")).getText();
          //编辑按钮
        String edit=driver.findElement(By.cssSelector("##")).getText();

        //删除按钮
        String del=driver.findElement(By.cssSelector("##")).getText();

        //校验文本
        assert !title.isEmpty();//不能为空
        assert !pushTime.isEmpty();
        assert !content.isEmpty();
        assert edit.equals("编辑");//文本保持一致
        assert del.equals("删除");
    }

}
